const {User} = require('../../../models/User');

module.exports = async (req, res) => {
	const {user_id, nickname} = req.body;
    try{
    const update = await User.updateOne({user_id:user_id},{$set:{"nickname":nickname}})
    res.send({errCode:"0",msg:"昵称修改成功"})
    }catch(e){
        res.status(400).send({errCode:"1",msg:"修改失败"})
    }
}